var str = 'A';
var height = 10;
let result;
for (var i = 0; i < height; i++)
{
  result = '';
  if ( (i % 2) === 0)
  {
    for (var j = height; j > i; j--)
    {
      result += str;
    }
    console.log(result);
  }
}
